/**
//////////////////////////////////
*Message.java
*This class defining classes that represent a Location Claim message
*model.messages.Message
*GPLv3
*@author Ferlin Alessandro
*2012.06.12
//////////////////////////////////
*/
package model.messages;

import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Float;

import model.node.Node;

public class LocationClaim implements MessageInterface{
	private int idCreator;
	private Point2D.Float posCreator=new Point2D.Float();
	
	/**
	 * Set the creator id and the position of the creator
	 * @param creator of message 
	 */
	public LocationClaim(Node creator) {
		idCreator=creator.getNodeId(); 
		posCreator.x=creator.getX();
		posCreator.y=creator.getY();
	}
	
	/**
	 * Return the id of the creator node
	 * 
	 * @return creator Id
	 */
	@Override
	public int getIdCreator() {
		return idCreator;
	}
	
	/**
	 * Return the Position of the creator node
	 * @return creator position Poind2D.Float
	 */	@Override
	public Point2D.Float getPosition() {
		return posCreator;
	}
	
}
